package me.firstapp.module.weixin.transfer;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import me.firstapp.module.base.BaseEntity;

@Entity
@Table(name = "TRANSFER_MEMBER_RECORD")
public class TransferMemberRecord extends BaseEntity {

	private static final long serialVersionUID = -1943884698634113501L;

	public static final int STATUS_NOT_PAY = 0;
	public static final int STATUS_PAYED = 1;
	public static final int STATUS_COMPLETE = 2;
	public static final int STATUS_CANCEL = 3;
	public static final String RECORD_NO_START = "T";

	// 记录号
	@Column(name = "RECORD_NO", length = 50, unique = true, nullable = false)
	private String recordNo;

	// 微信openId
	@Column(name = "OPEN_ID", length = 40, nullable = false)
	private String openId;

	// 卡号
	@Column(name = "CARD_NO", length = 40, nullable = false)
	private String cardNo;

	// 转让ID
	@Column(name = "TRANSFER_MEMBER_PRODUCT_ID", nullable = false)
	private Long transferMemberProductId;

	// 转让数量
	@Column(name = "COUNTS", nullable = false)
	private Integer counts;

	// 支付金额
	@Column(name = "PAY_AMOUNT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal payAmount;

	// 状态，0未支付。1已支付。2已完成
	@Column(name = "STATUS", columnDefinition = "TINYINT DEFAULT 0", nullable = false)
	private Integer status;

	// 创建时间
	@Column(name = "CREATE_TIME", columnDefinition = "DATETIME", nullable = false)
	private Date createTime;

	// 支付时间
	@Column(name = "PAY_TIME", columnDefinition = "DATETIME")
	private Date payTime;

	// 完成时间
	@Column(name = "COMPLETE_TIME", columnDefinition = "DATETIME")
	private Date completeTime;

	// 取消时间
	@Column(name = "CANCEL_TIME", columnDefinition = "DATETIME")
	private Date cancelTime;

	public String getRecordNo() {
		return recordNo;
	}

	public void setRecordNo(String recordNo) {
		this.recordNo = recordNo;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public Long getTransferMemberProductId() {
		return transferMemberProductId;
	}

	public void setTransferMemberProductId(Long transferMemberProductId) {
		this.transferMemberProductId = transferMemberProductId;
	}

	public BigDecimal getPayAmount() {
		return payAmount;
	}

	public void setPayAmount(BigDecimal payAmount) {
		this.payAmount = payAmount;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public Date getCompleteTime() {
		return completeTime;
	}

	public void setCompleteTime(Date completeTime) {
		this.completeTime = completeTime;
	}

	public Integer getCounts() {
		return counts;
	}

	public void setCounts(Integer counts) {
		this.counts = counts;
	}

	public Date getCancelTime() {
		return cancelTime;
	}

	public void setCancelTime(Date cancelTime) {
		this.cancelTime = cancelTime;
	}

}
